const jwt = require('jsonwebtoken')
var buf1 = new Buffer.alloc(256)
// buf1.fill(0)

const token = jwt.sign({ id: 1, username: '朱元璋' }, 'privateKey')

// console.log('token:', tableData)
// 登陆 生成token 存储在buffer中，
const str = buf1.write(JSON.stringify(token))
if (str) {
  console.log('str: ', str)
  console.log("buf1's content: ", buf1.toString())
}
